/* eslint-disable prettier/prettier */
/*
包含 n个接口请求函数的模块
*/
import ajax from "./ajax";

// 分公司接口
//export * from "./subCompanyApi";
// const BASE_URL = "http://44.27.80.100:5000";
const BASE_URL = "http://192.168.1.14:5000";

/**
 * 登陆账号
 * @param {*} pramas
 */
export const reqLogin = pramas => ajax(BASE_URL + "/user/login", pramas, "POST");

/**
 * 退出账号（清除）
 * @param {*} pramas
 */
export const reqLogout = pramas => ajax(BASE_URL + "/user/logout", pramas, "POST");

/**
 * 行人入侵个数
 * @param {*} pramas
 */
//export const reqServiceStatistic = pramas => ajax(BASE_URL + "/traffic/statistic/query", pramas);
export const reqServiceStatistic = pramas => ajax(BASE_URL + "/count/query", pramas);

/**
 * 查询报警事件 (查询公路事件列表)
 * @param {*} pramas
 */
//export const reqEvent = pramas => ajax(BASE_URL + "/event/traffic/query", pramas);
export const reqEvent = pramas => ajax(BASE_URL + "/event/query", pramas);


/**
 * 查询公路所有视频流
 * @param {*} pramas
 */
//export const reqStreamQuery = pramas => ajax(BASE_URL + "/video/traffic/get", pramas);
export const reqStreamQuery = pramas => ajax(BASE_URL + "/video/query/lists", pramas);

/**
 * 查询公路数据统计
 * @param {*} pramas
 */
//export const reqTrafficStat = pramas => ajax(BASE_URL + "/traffic/statistic/query", pramas);
export const reqTrafficStat = pramas => ajax(BASE_URL + "/count/query", pramas);

/**
 * 查询公路监控视频的状态
 * @param {*} pramas
 */
//export const reqVideoState = pramas => ajax(BASE_URL + "/video/state/get", pramas);
export const reqVideoState = pramas => ajax(BASE_URL + "/state/query", pramas);

/**
 * 查询一路公路监控视频的信息，流地址，并请求推流
 * @param {*} pramas
 */
//export const reqVideoState = pramas => ajax(BASE_URL + "/video/state/get", pramas);
export const reqOneStream = pramas => ajax(BASE_URL + "/video/query/one", pramas);

/**
 * 获取道路列表
 * @param {*} pramas
 */
export const reqRoadList = pramas => ajax(BASE_URL + "/road/query", pramas);


/**
 * 导出报表
 * @param {*} pramas
 */
//export const reqVideoState = pramas => ajax(BASE_URL + "/video/state/get", pramas);
export const exportExcelUrl = BASE_URL + "/report/query"

/**
 * 报警器
 * @param {*} pramas
 */
export const reqReportAlarm = pramas => ajax(BASE_URL + "/report/alarm", pramas);

/**
 * 查询所有道路列表
 * @param {*} pramas
 */
export const reqRoadsList = pramas => ajax(BASE_URL + "/road/query", pramas);

/**
 * 查询视频流存在情况
 * @param {*} pramas
 */
export const reqVideoPingResult = pramas => ajax(BASE_URL + "/video/stream/detection", pramas);
